Computer systems combine numerous complex electronic components to achieve high-speed processing and manipulation of data. The reliable operation of such a system requires consistent and predictable behavior by each component of the system. For example, electrical signals exchanged between the components must be within set voltage and timing constraints.
When a new computer is developed, combinations of new or relatively unproven components may be used. To ensure that components work together properly, a software-implemented design simulation may be used. Design simulations can include programmable representations of various computer system hardware components. These programmable representations are commonly referred to as bus functional models (BFMs). BFMs can be used to model the behavior of, for example, a microprocessor, a peripheral bus, a memory chip, or a hard disk drive. By simulating components using BFMs, problems with a design can be identified before a physical realization is developed.
The present invention includes a device simulation system that can collect information describing a desired data exchange between simulated devices and can assist in the generation of simulation model control programs that implement the desired data exchange. For example, an engineer may wish to test the interaction between components of a computer system that are being designed. The engineer may use a simulation system including programmable simulation models. Using the present invention, simulation model control programs can be automatically generated to realize a desired simulation.
In one embodiment, the invention features a computer-implemented method of generating simulation code. The method includes interacting with a user to receive an address constraint. The address constraint designates a collection of addresses at an interface of a simulation model. Additionally, the method includes generating a collection of data transfer instructions. Each data transfer instruction includes a data transfer address selected from the collection of addresses.
Implementations of the invention may include one or more of the following features. Processing of a data transfer instruction by a simulation model may produce a transfer of data from the simulation model to a second simulation model. The address constraint may include a collection of address ranges and may include address range probability data. The probability data may designate a probability of selection of each of the address ranges. Selection of a data transfer address may include selecting an address range and an address within the address range. The method may also include generating a collection of data retrieval instructions. Each data retrieval instruction may include a data retrieval address selected from the collection of addresses. A simulation model processing a data retrieval instruction may simulate a bus transfer command effecting a data transfer from a second simulation model. The simulation model may be a bus functional model and may include a software-implemented interface to a model of a device under test.
In general, in another embodiment, the invention features a computer-implemented simulation method. The method includes data input means for receiving address range constraint information from a user, means for generating a collection of simulation model data output instructions, and means for generating a collection of simulation model data input instructions. Each data output instruction includes a destination address at an interface of the model. Each data input instructions includes a transfer address accessible at the interface of the model.
Implementations of the invention may include one or more of the following features. The method may include producing a modeling language program file. The program file may include the collection of data output instructions and the collection of data input instructions. The data output instructions and the data input instructions may be interspersed. Each transfer addresses may match a destination address of a generated data output instruction.
In general, in another embodiment, the invention features a computer program residing on a computer-readable medium. The program includes instructions for causing a computer to interact with a user to receive address constraint information that designates a collection of addresses at an interface of a simulation model. The program also includes instructions to generate a collection of simulation model data transfer instructions. Each data transfer instruction includes a data transfer address selected from the collection of addresses.
Implementations of the invention may include one or more of the following features. The computer program may include instructions for causing the computer to generate a collection of data retrieval instructions. Each data retrieval instruction may include a data retrieval address selected from the collection of addresses.
In general, in another embodiment, the invention features a simplified simulation data entry system. The system includes means for receiving address constraint information delimiting a collection of data transfer address values and means for generating a collection of simulation data transfer instructions. Each data transfer instruction may include an address selected from the collection of data transfer address values.
Implementations of the invention may include one or more of the following features. An address range constraint may include a collection of address ranges. Each address range may be bounded by a minimum and a maximum value. An address range constraint may also include address range probability data. The means for generating data transfer instructions may include means for selecting an address from the collection based on the address range probability data. The system may include means for receiving a bus transaction constraint, the bus transaction constraint designating a minimum and a maximum number of bytes that a simulation model can transfer in bus data transfer transaction. The system may also include means for receiving a collection of device constraints. The device constraints may designate data transfer characteristics of a simulated device. The means for generating may include means for generating in accordance with the device constraints.
Implementations of the invention may include one or more of the following advantages. Simulation control programs may be generated using a simplified interface. Control programs for numerous simulated models may be simultaneously generated and their interactions may be coordinated. Other advantages and features will become apparent from the following description and from the claims.